package com.selangshiwo.sina.requst;

public class SSOLoginRequestPack extends RequestPack implements IRequestPack {

	public SSOLoginRequestPack(String uName, String uPwd, String nonce,
			String serverTime, String pcid) {
		super("post",REQUEST_URL.SSOLOGIN.toStringWithVersion());
		setUserName(uName);
		setPcid(pcid);
		setServerTime(serverTime);
		setNonce(nonce);
		setUserPwd(uPwd);
	}

	public void setPcid(String pcid) {
		setParam("pcid", pcid);
	}

	public void setServerTime(String serverTime) {
		setParam("servertime", serverTime);
	}

	public void setNonce(String nonce) {
		setParam("nonce", nonce);
	}

	public void setUserName(String uName) {
		setParam("su", uName);
	}

	public void setUserPwd(String uPwd) {
		setParam("sp", uPwd);
	}

	public void setDefaultParams() {
		setParam("encoding", "UTF-8");
		setParam("entry", "weibo");
		setParam("from", "");
		setParam("gateway", "1");
		setParam("pwencode", "wsse");
		setParam("returntype", "META");
		setParam("savestate", "7");
		setParam("useticket", "1");
		setParam("ssosimplelogin", "1");
		setParam("service", "miniblog");
		setParam("vsnf", "1");
		setParam(
				"url",
				"http://weibo.com/ajaxlogin.php?framelogin=1&callback=parent.sinaSSOController.feedBackUrlCallBack");
		setParam("returntype", "META");

	}

}
